import { defHttp } from '../http'
import type { NodePackParams, PackParams, ReBuildParams } from '../model/pack'
import type { BaseListResp } from './response'

/** 打包任务列表 */
export const pack_list = (params: PackParams) =>
  defHttp.get<BaseListResp<any>>('/v1/pack_task', { params })

/** 节点打包任务列表 */
export const node_pack_list = (params: NodePackParams) =>
  defHttp.get<BaseListResp<any>>('/v1/node_pack_task', { params })
/** 重新打包  */
export const re_build = (params: ReBuildParams) =>
  defHttp.post<BaseListResp<any>>('/v1/pack_task/repack', { params })
